/* Variables CSS */
:root {
    --primary-color: #77dd77;
    --secondary-color: #a8e6cf;
    --accent-color: #dcedc1;
    --light-color: #e8f5e9;
    --text-color: #2e7d32;
    --white: #ffffff;
}


/* Reset y estilos generales */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Poppins', sans-serif;
    background: linear-gradient(135deg, var(--primary-color) 0%, var(--secondary-color) 100%);
    color: var(--text-color);
    min-height: 100vh;
    line-height: 1.6;
    padding-top: 70px; /* Espacio para el header fijo */
}

/* Header Styles */
.header {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  background: linear-gradient(
    135deg,
    var(--primary-color),
    var(--secondary-color)
  );
  padding: 0 10%;
  display: flex;
  align-items: center;
  justify-content: space-between;
  z-index: 1000;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
  border-bottom: 2px solid var(--white);
  transition: all 0.3s ease;
  height: 70px;
}

.header:hover {
  box-shadow: 0 6px 16px rgba(0, 0, 0, 0.15);
}

.logo {
  font-size: 28px;
  font-weight: 700;
  color: var(--white);
  text-shadow: 1px 1px 2px rgba(0, 0, 0, 0.2);
  letter-spacing: 1px;
}

.navigation ul {
  list-style: none;
  margin: 0;
  padding: 0;
}

.header .navigation ul li {
  float: left;
  position: relative;
}

.header .navigation ul li a {
  font-size: 16px;
  font-weight: 500;
  color: var(--white);
  text-decoration: none;
  padding: 22px 20px;
  display: block;
  transition: all 0.3s ease;
}

.header .navigation ul li a:hover {
  background-color: rgba(255, 255, 255, 0.733);
  transform: translateY(-2px);
  color: var(--text-color);
}

#toggle,
.header label {
  display: none;
  cursor: pointer;
}

.menu {
  width: 28px;
  height: 28px;
  filter: brightness(0) invert(1);
}

@media (max-width: 950px) {
  .header label {
    display: initial;
  }

  .header {
    padding: 15px 10%;
  }

  .header .navigation {
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    background: var(--primary-color);
    display: none;
    border-radius: 0 0 12px 12px;
  }

  .header .navigation ul li {
    width: 100%;
  }

  .header .navigation ul li a {
    padding: 12px 20px;
  }

  #toggle:checked ~ .navigation {
    display: block;
    animation: slideDown 0.4s ease-out;
  }
}

/* Animación para el menú desplegable */
@keyframes slideDown {
  from {
    opacity: 0;
    transform: translateY(-20px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

/* Contenedor principal */
.container {
    max-width: 1200px;
    margin: 0 auto;
    background-color: rgba(255, 255, 255, 0.95);
    border-radius: 20px;
    box-shadow: 0 15px 30px rgba(0, 0, 0, 0.2);
    overflow: hidden;
    padding: 30px;
    margin-top: 20px;
}

/* Encabezado del juego */
.game-header {
    text-align: center;
    margin-bottom: 30px;
    padding-bottom: 20px;
    border-bottom: 3px solid var(--accent-color);
}

.game-header h1 {
    font-family: 'Fredoka One', cursive;
    color: var(--secondary-color);
    font-size: 2.8rem;
    margin-bottom: 10px;
    text-shadow: 2px 2px 0 #ffd166;
}

.game-header .subtitle {
    font-size: 1.2rem;
    color: #6c757d;
    font-weight: 300;
}

/* Área del juego */
.game-area {
    display: flex;
    flex-wrap: wrap;
    gap: 30px;
    margin-bottom: 30px;
}

.story-container {
    flex: 1;
    min-width: 300px;
    background-color: #f8f9fa;
    border-radius: 15px;
    padding: 25px;
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.08);
}

.story-intro {
    margin-bottom: 20px;
    padding-bottom: 15px;
    border-bottom: 2px dashed var(--primary-color);
}

.story-intro h2 {
    color: var(--primary-color);
    font-size: 1.8rem;
    margin-bottom: 10px;
}

.story-intro p {
    color: #495057;
    font-size: 1.1rem;
}

.story-text {
    font-size: 1.3rem;
    line-height: 1.8;
    color: #343a40;
}

.blank {
    display: inline-block;
    min-width: 100px;
    height: 40px;
    border: 2px dashed var(--accent-color);
    border-radius: 5px;
    margin: 0 5px;
    text-align: center;
    line-height: 36px;
    font-weight: bold;
    color: var(--secondary-color);
    cursor: pointer;
    transition: all 0.3s ease;
    background-color: var(--white);
    vertical-align: middle;
    padding: 0 5px;
}

.blank:hover {
    background-color: #e9ecef;
    border-style: solid;
}

.blank.selected {
    background-color: #ffd166;
    border: 2px solid var(--accent-color);
}

.blank.correct {
    background-color: var(--correct-color);
    color: var(--white);
    border-color: #2e933c;
}

.blank.incorrect {
    background-color: var(--incorrect-color);
    color: var(--white);
    border-color: #c1121f;
}

/* Controles */
.controls {
    flex: 1;
    min-width: 300px;
    display: flex;
    flex-direction: column;
    gap: 25px;
}

.verbs-panel, .score-panel {
    background-color: #f8f9fa;
    border-radius: 15px;
    padding: 25px;
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.08);
}

.verbs-panel h3, .score-panel h3 {
    color: var(--primary-color);
    font-size: 1.5rem;
    margin-bottom: 20px;
    display: flex;
    align-items: center;
    gap: 10px;
}

.verbs-list {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(120px, 1fr));
    gap: 12px;
    margin-bottom: 25px;
}

.verb-option {
    background-color: var(--secondary-color);
    color: var(--white);
    border: none;
    border-radius: 8px;
    padding: 12px 8px;
    font-size: 1.1rem;
    font-weight: bold;
    cursor: pointer;
    transition: all 0.3s ease;
    text-align: center;
}

.verb-option:hover {
    background-color: #1a5fd8;
    transform: translateY(-3px);
    box-shadow: 0 5px 10px rgba(0, 0, 0, 0.1);
}

.verb-option.used {
    background-color: #6c757d;
    cursor: not-allowed;
    opacity: 0.6;
    transform: none;
}

.btn {
    display: block;
    width: 100%;
    padding: 15px;
    border: none;
    border-radius: 10px;
    font-size: 1.2rem;
    font-weight: bold;
    cursor: pointer;
    transition: all 0.3s ease;
    margin-top: 10px;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
}

.check-btn {
    background-color: var(--correct-color);
    color: var(--white);
}

.check-btn:hover {
    background-color: #7bb42b;
    transform: translateY(-3px);
    box-shadow: 0 5px 15px rgba(138, 201, 38, 0.3);
}

.reset-btn {
    background-color: var(--accent-color);
    color: var(--white);
}

.reset-btn:hover {
    background-color: #e68a00;
    transform: translateY(-3px);
    box-shadow: 0 5px 15px rgba(255, 158, 0, 0.3);
}

/* Panel de puntuación */
.score-display {
    text-align: center;
    margin-bottom: 25px;
}

.score-circle {
    width: 120px;
    height: 120px;
    border-radius: 50%;
    background: linear-gradient(135deg, var(--primary-color) 0%, var(--secondary-color) 100%);
    color: var(--white);
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto 15px;
    font-size: 2.5rem;
    font-weight: bold;
    box-shadow: 0 8px 20px rgba(37, 117, 252, 0.3);
}

.score-text {
    font-size: 1.2rem;
    color: #495057;
    font-weight: 600;
}

.feedback {
    background-color: var(--white);
    border-radius: 10px;
    padding: 20px;
    border-left: 5px solid var(--secondary-color);
    min-height: 80px;
}

.feedback p {
    font-size: 1.1rem;
    color: #495057;
}

.feedback.correct {
    border-left-color: var(--correct-color);
}

.feedback.incorrect {
    border-left-color: var(--incorrect-color);
}

/* Instrucciones */
.instructions {
    background-color: #f8f9fa;
    border-radius: 15px;
    padding: 25px;
    margin-bottom: 30px;
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.08);
}

.instructions h3 {
    color: var(--primary-color);
    font-size: 1.5rem;
    margin-bottom: 15px;
    display: flex;
    align-items: center;
    gap: 10px;
}

.instructions p {
    margin-bottom: 10px;
    color: #495057;
}

.instructions p:last-child {
    margin-top: 15px;
    padding-top: 15px;
    border-top: 2px dashed var(--primary-color);
}

/* Pie de página */
footer {
    text-align: center;
    padding-top: 20px;
    border-top: 2px solid #ffd166;
    color: #6c757d;
    font-size: 0.9rem;
}

footer .credits {
    font-size: 0.8rem;
    color: #adb5bd;
    margin-top: 5px;
}

/* Estilo para respuestas correctas */
.correct-answer {
    color: var(--correct-color);
    font-weight: bold;
    font-size: 0.9rem;
    margin-left: 5px;
}

/* Responsive */
@media (max-width: 768px) {
    body {
        padding-top: 60px;
    }
    
    .header {
        height: 60px;
        padding: 0 5%;
    }
    
    .container {
        padding: 20px;
        margin-top: 10px;
        border-radius: 15px;
    }
    
    .game-header h1 {
        font-size: 2.2rem;
    }
    
    .game-area {
        flex-direction: column;
    }
    
    .verbs-list {
        grid-template-columns: repeat(auto-fill, minmax(100px, 1fr));
    }
    
    .score-circle {
        width: 100px;
        height: 100px;
        font-size: 2rem;
    }
}

@media (max-width: 480px) {
    .game-header h1 {
        font-size: 1.8rem;
    }
    
    .story-text {
        font-size: 1.1rem;
    }
    
    .blank {
        min-width: 80px;
        height: 35px;
        line-height: 31px;
    }
    
    .verbs-list {
        grid-template-columns: repeat(3, 1fr);
    }
    
    .score-circle {
        width: 80px;
        height: 80px;
        font-size: 1.8rem;
    }
}